package br.sed.theenemy.presentation.action.json;

import java.io.Serializable;

/**
 * 
 * @author JulioCB
 * @email jcbjulio@gmail.com
 * 
 */
public class JSONResponse implements Serializable {

	private static final long serialVersionUID = -208345369489863448L;

	private final boolean success;
    private final Object content;
    private final String[] errors;

    /**
     * Class constructor that takes the success parameters, content, and Errors. 
     * 
     * @param success boolean value that indicates whether there was success
     * @param content content
     * @param errors String array with the errors occurred
     */
    public JSONResponse(final boolean success, final  Object content,final  String[] errors) {
        this.content = content;
        this.success = success;
        this.errors = errors;
    }

    /**
     * Getter method for content.
     * 
     * @return Object content
     */
    public final Object getContent() {
        return content;
    }

    /**
     * Getter method for errors.
     * 
     * @return String[] errors
     */
    public final String[] getErrors() {
        return errors;
    }

    /**
     * Getter method for success.
     * 
     * @return boolean success
     */
    public final boolean isSuccess() {
        return success;
    }
	
}
